﻿using System;
using System.Windows.Forms;
using System.Drawing;

namespace AgilePokerCards
{
    public partial class FormImage : Form
    {
        public CardType Card { get; set; }

        public FormImage()
        {
            InitializeComponent();
        }

        private void pictureMain_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void Form_Load(object sender, EventArgs e)
        {
            Bitmap image = Helper.GetImageFromResources(Card);
            if(image != null)
            {
                pictureMain.Image = image;
            }
            else
            {
                Close();
            }
        }
    }
}